		<?php /** Begin Featured Image **/ ?>
			<?php 
			global $gantry;
			$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
							?>	
							<!-- Begin Thumbnail -->
							<div class="all_image_inside_content">
							<!-- Begin Thumbnail -->
                            
					<div class="blog_thumb_image">
                    <?php 
					   global $mimo_custom_mb;$meta = $mimo_custom_mb->the_meta($post->ID);$mimo_custom_mb->have_fields_and_multi('mimo_docs');$mimo_custom_mb->the_field ('mimo_docs');
					  
					  global $mimo_vimeo_mb;$metavimeo = $mimo_vimeo_mb->the_meta($post->ID);$mimo_vimeo_mb->have_fields_and_multi('mimovimeos');$mimo_vimeo_mb->the_field ('mimovimeos');
					  
					  global $mimo_youtube_mb;$metayoutube = $mimo_youtube_mb->the_meta($post->ID);$mimo_youtube_mb->have_fields_and_multi('mimoyoutubes');$mimo_youtube_mb->the_field ('mimoyoutubes');


						
					
						$urlnewswall = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );?>
    
    
					 <?php 
							
					
					 if(($meta) || ($metavimeo) || ($metayoutube)) { ?>
                    <div id="flexslider" class="flexslider portfolio_slider format_images" >

                 
                <ul id="allimg_id<?php the_Id(); ?>" class="format_images slides">
                <?php
		if($meta):		
foreach ($meta['mimo_docs'] as $item )
{
 
  $imagen = wp_get_attachment_image_src($item, 'mimo-1col'); // Obtenemos la imagen "full". En vez de full podemos poner otro que dispongamos en nuestro tema
  $n = 0;$n++;
 $laurl = $item['imgurl'];
 
  echo '<li class="selector delujo"><a data-rel="prettyPhoto" class="lightbox nopretty" href="'. $laurl .'"><img  src="'. $laurl .'"  title="'. $n .'"';
   echo ' alt="none"';
  echo ' /></a></li>';
 
} ;endif;
?>
	
	
  <?php
  if($metavimeo):	
foreach($metavimeo['mimovimeos'] as $itemvideo){
 
$vimeourl = $itemvideo['ids'];
  echo '<li class="selector"><div class="js-video [vimeo, widescreen]">
      <iframe id="player_1" class="vimeoiframe" src="http://player.vimeo.com/video/'. $vimeourl .'?api=1&player_id=player_1"  frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
     </div></li>';
 
 
}  ;endif; ?>
    
   
  <?php
   if($metayoutube):
foreach($metayoutube['mimoyoutubes'] as $itemyoutube){
 
 $youtubeurl = $itemyoutube['youtubeids'];
  echo '<li class="selector"><div id="youtube_video"  class="js-video [vimeo, widescreen]">
      <iframe id="player_1"  height="100%" src="http://www.youtube.com/embed/'.$youtubeurl.'?enablejsapi=1" frameborder="0" wmode="Opaque" allowfullscreen></iframe>
	   
     </div></li>';
 
 ?>
 
 <?php
};endif;
?></ul>

	
	<?php
	
	 ?>
    
 <script type="text/javascript">
    jQuery(document).ready(function(){
	


	jQuery('.format_images').flexslider({
		selector: '.selector',
	    directionNav: true,
		slideshow: false,
		pauseOnAction: true,
		pauseOnHover: true,
		easing: 'swing',
		video:true,
		controlNav: false, 
		before: function(slider){
			if ( jQuery('#youtube_video')[0] ) { 
		callPlayer('youtube_video', 'pauseVideo');}
		if ( jQuery('#player_1')[0] ) { 
		var myid ='player_1';
		jQuery("[id*="+myid+"]").each(function(){
			Froogaloop(  jQuery(this)[0] ).api('pause');});
      	}              //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
 
	  
		}});
		});
    	</script> 
<div class="clear"></div>	</div>


<?php } else if($urlnewswall) {   ?>
							<div class="newswall-image portfolio_slider">
								<a data-rel="prettyPhoto" href="<?php echo $urlnewswall; ?>"><?php 
								if(is_blog()){
								$mimocolumns = $gantry->get( 'blog-post-columns');
								} else if (is_category()){
								$mimocolumns = $gantry->get( 'category-post-columns');	
									
								} else if (is_archive()){
								$mimocolumns = $gantry->get( 'archive-post-columns');	
									
								}
								else if (is_tag()){
								$mimocolumns = $gantry->get( 'tag-post-columns');	
									
								}
								else if (is_search()){
								$mimocolumns = $gantry->get( 'search-post-columns');	
									
								}
								
								
								$mimoblogimagesize = 'mimo-' . $mimocolumns . 'col' ;
								if(function_exists('the_post_thumbnail') && has_post_thumbnail()) : the_post_thumbnail('mimo-1col', array('class' => 'rt-image '.$gantry->get('thumb-position')
)); endif; ?>					<div class="clear"></div></a>				
		</div>	<?php } else {}; ?>				
</div>
<div class="clear"></div>

</div> 


			
				<?php /** End Featured Image **/ ?>